import BaseEnums from "../BaseEnums";

class DataBaseOperationEnum extends BaseEnums {
    public static DATABASE_DELETE: DataBaseOperationEnum =
        new DataBaseOperationEnum("DATABASE_DELETE", "删除", 1)
    public static DATABASE_EDIT: DataBaseOperationEnum =
        new DataBaseOperationEnum("DATABASE_EDIT", "编辑", 2)
    public static DATABASE_NEW_QUERY: DataBaseOperationEnum =
        new DataBaseOperationEnum("DATABASE_NEW_QUERY", "新建查询", 3)
    public static DATABASE_EXPORT: DataBaseOperationEnum =
        new DataBaseOperationEnum("DATABASE_EXPORT", "转存sql文件", 4)
    public static DATABASE_IMPORT: DataBaseOperationEnum =
        new DataBaseOperationEnum("DATABASE_IMPORT", "运行sql文件", 5)


    public static getDatabaseOperation = (node) => {

        return [
            {
                label: DataBaseOperationEnum.DATABASE_DELETE.title,
                key: DataBaseOperationEnum.DATABASE_DELETE.code,
                show: true
            },
            {
                label: DataBaseOperationEnum.DATABASE_EDIT.title,
                key: DataBaseOperationEnum.DATABASE_EDIT.code,
                show: true

            },
            {
                label: DataBaseOperationEnum.DATABASE_NEW_QUERY.title,
                key: DataBaseOperationEnum.DATABASE_NEW_QUERY.code,
                show: true
            },
            {
                label: DataBaseOperationEnum.DATABASE_EXPORT.title,
                key: DataBaseOperationEnum.DATABASE_EXPORT.code,
                show: true,

            },
            {
                label: DataBaseOperationEnum.DATABASE_IMPORT.title,
                key: DataBaseOperationEnum.DATABASE_IMPORT.code,
                show: true
            }
        ];

    }

}

export default DataBaseOperationEnum;